﻿<Window x:Class="WowModelExplorer.Controls.M2EquipmentsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:data="clr-namespace:WowModelExplorer.Data"
        Title="{DynamicResource equipmentsWindow}"
        Width="400"
        Height="300"
        Background="{StaticResource WindowBackgroundBrush}"
        FontFamily="{DynamicResource WindowFontFamily}"
        FontStyle="{DynamicResource WindowFontStyle}"
        FontWeight="{DynamicResource WindowFontWeight}">
    <Grid Name="_mainGrid">
        <Grid.Resources>
            <data:SlotItemCollection x:Key="_slotItems" />
        </Grid.Resources>

        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        
        <ListView Name="_listView"
                  Grid.Row="0"
                  AllowDrop="True"
                  ItemsSource="{Binding Source={StaticResource _slotItems},
                                        Mode=OneTime}">
            <ListView.View>
                <GridView>
                    <GridViewColumn Width="80" DisplayMemberBinding="{Binding Path=SlotName}">
                        <GridViewColumnHeader Content="{DynamicResource slotName}" Tag="SlotName" />
                    </GridViewColumn>
                    <GridViewColumn Width="100" DisplayMemberBinding="{Binding Path=ItemName}">
                        <GridViewColumnHeader Content="{DynamicResource itemName}" Tag="ItemName" />
                    </GridViewColumn>
                    <GridViewColumn Width="60" DisplayMemberBinding="{Binding Path=SubClassName}">
                        <GridViewColumnHeader Content="{DynamicResource type}" Tag="Type" />
                    </GridViewColumn>
                    <GridViewColumn Width="60" DisplayMemberBinding="{Binding Path=ItemId}">
                        <GridViewColumnHeader Content="{DynamicResource itemId}" Tag="ItemId" />
                    </GridViewColumn>
                    <GridViewColumn Width="60" DisplayMemberBinding="{Binding Path=ModelId}">
                        <GridViewColumnHeader Content="{DynamicResource modelId}" Tag="ModelId" />
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>

        <StackPanel Grid.Row="1"
                    Margin="0,0,10,0"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"
                    Orientation="Horizontal">
            <Button Name="btImport"
                    Width="75"
                    Height="23"
                    Margin="0,0,4,0"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    Click="btImport_Click"
                    Content="{DynamicResource import}" />
            <Button Name="btExport"
                    Grid.Row="1"
                    Width="75"
                    Height="23"
                    Margin="4,0,0,0"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    Click="btExport_Click"
                    Content="{DynamicResource export}" />
        </StackPanel>
    </Grid>
</Window>
